import { hydrateRoot } from 'react-dom/client'
import router from '@/router'

import { BrowserRouter, Routes, Route } from 'react-router-dom'

const Client = () => {
  return (
    <BrowserRouter>
      <Routes>
        {router.map((item) => {
          return <Route {...item} />
        })}
      </Routes>
    </BrowserRouter>
  )
}

hydrateRoot(document.getElementById('root') as any, <Client />)
